package list_map;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2020-11-09 19:49
 **/
public class Demo1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = 0;
        ArrayList list = new ArrayList();
        do {
            list.add(scanner.nextInt());
            i++;
        } while (i < 10);
        System.out.println(list);
        //降序输出
        Collections.sort(list, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2-o1;
            }

//            @Override
//            public int compare(Object o1, Object o2) {
//                Integer o11= (Integer) o1;
//                Integer o22= (Integer) o2;
//                return o22-o11;
//            }
        });
        System.out.println(list);
    }
}
